#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__

#include "cocos2d.h"
#include "Box2D\Box2D.h"
#include "GameObjHero.h"
#include "GameObjEnemy.h"

#define MAX_VERT_SPEED -3

USING_NS_CC;

class HelloWorld : public cocos2d::CCLayer
{
public:
    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    virtual bool init();  

	virtual void update(float delta);

    // there's no 'id' in cpp, so we recommend returning the class instance pointer
    static cocos2d::CCScene* scene();
    
    // a selector callback
    void menuCloseCallback(CCObject* pSender);
    
    // implement the "static node()" method manually
    CREATE_FUNC(HelloWorld);

	//void updateHero();
	void updateGameActObj(GameObj *gameObj);

private:
	CCArray* gameObjList;

	GameObjHero* hero;
	CCTMXTiledMap *map;
	CCPoint winMapCenter;
	CCSize tileSize;
	CCSize winSize;
	CCPoint heroSize;

	//float deltaX, deltaY;
	//int indexX, indexY;
	//unsigned int mvalue;
	//int tileGid, tileGid2;
	//CCPoint detectIndex;
	//CCPoint heroPosition;
	//CCPoint mapPosition;
};

#endif // __HELLOWORLD_SCENE_H__
